/**
 * 
 */
package com.health.commons;

import java.util.Map;



/**
 * @author bobo
 *
 */
public class BusinessException extends RuntimeException{
private static final long serialVersionUID = 0xc1a865c45ffdc5f9L;
	
	/**
	 * ��Դ�����Ϣ��String���з�װ���쳣
	 * @param frdMessage
	 */
	public BusinessException(String frdMessage) {
		super(createFriendlyErrMsg(frdMessage));
	}

	/**
	 * ��Դ�����Ϣ��MAP���з�װ���쳣
	 * @param frdMessage
	 */
	public BusinessException(Map frdMessage) {
		super(createJsonErrMsg(frdMessage));
	}
	
	public BusinessException(Throwable throwable) {
		super(throwable);
	}

	public BusinessException(Throwable throwable, String frdMessage) {
		super(throwable);
	}

	private static String createFriendlyErrMsg(String msgBody) {
		String prefixStr = "��Ǹ��";
		String suffixStr = " ���Ժ����Ի������Ա��ϵ��";
		StringBuffer friendlyErrMsg = new StringBuffer("");
		friendlyErrMsg.append(prefixStr);
		friendlyErrMsg.append(msgBody);
		friendlyErrMsg.append(suffixStr);
		return friendlyErrMsg.toString();
	}
	
	
	private static String createJsonErrMsg(Map jsonMap) {
	 
			
		 
		String content = "";

		
		return content;
	}
	
}

 